{set:$page=(isset($_GET['page'])&&(intval($_GET['page'])>0))?intval($_GET['page']):1;}
{set:$user_id = $this->user['user_id']}
{set:$queryWithdrawList = Api::run('getWithdrawList',$user_id)}
{set:$items = $queryWithdrawList->find()}
<section>
	<div class="pending-detial">

<div class="panel panel-default">
		  <div class="panel-heading">
				<h3 class="panel-title">账户余额：￥<strong>{$this->memberRow['balance']}</strong></h3>
		  </div>

		  <div class="panel-body">
		    <ul class="list-group">
		    	{if:$items}
		{foreach:items = $items}
		    	<li class="list-group-item ">
		    	<table class="table table-bordered table-hover">
				
					<tbody>
						<tr>
							<td>会员备注</td><td>{$item['note']}</td>
						</tr>
						<tr>
							<td>管理员备注</td><td>{$item['re_note']}</td>
						</tr>
						<tr>
							<td>金额</td><td>{$item['amount']} 元</td>
						</tr>

						<tr>
							<td>申请时间</td><td>{$item['time']}</td>
						</tr>


						<tr>
							<td>状态</td><td>{echo:Common::getWithdrawStatus($item['status'])}</td>
						</tr>

						<p class="head">&nbsp;</p>
				<tr>
					{if:$item['status']==0}
					<input type="button" class="btn" value="取消" onclick="delModel({link:'{url:/ucenter/withdraw_del/id/$item[id]}'});" />
					{/if}
					</tr>

					</tbody>
				</table></li>
				
	  {/foreach}

			</ul>
		  </div>

		
		  	{$queryWithdrawList->getPageBar()}
	{else:}
			  <div class="">
				<h3>填写提现申请</h3>

				<form action="{url:/ucenter/withdraw_act}" method="POST" class="form-inline" role="form">
				
					<div class="form-group">
						<label class="sr-only" for="">label</label>
						<input type="text" name='name' class="form-control" id="" placeholder="收款人姓名">
					</div>

					<div class="form-group">
						<label class="sr-only" for="">label</label>
						<input type="text" name='amount'  class="form-control" id="" placeholder="提现金额">
					</div>

					<div class="form-group">
						<label class="sr-only" for="">label</label>
						<input type="text" name='note'   class="form-control" id="" placeholder="备注信息">
					</div>
				
					
				
					<button type="submit" class="btn btn-primary">提交提现申请</button>
				</form>
		  </div>
		{/if}
	</div>


	</div>

</section>

<script type='text/javascript'>
	var formObj = new Form('withdraw');
	formObj.init({
		'name':'{$this->withdrawRow['name']}',
		'note':'{$this->withdrawRow['note']}',
		'amount':'{$this->withdrawRow['amount']}'
	});
</script>
